package com.techsoul.module.tms.mapper;

import java.util.List;

import com.techsoul.module.tms.pojo.entity.Carrier;
import com.techsoul.module.tms.pojo.param.CarrierSearchParam;
import com.techsoul.module.tms.pojo.vo.CarrierVo;
import com.techsoul.module.tms.pojo.vo.ExpressVo;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhaowei
 * @since 2021-06-02
 */
public interface CarrierMapper extends BaseMapper<Carrier> {
    List<CarrierVo> findAll(@Param("params") CarrierSearchParam params);
    CarrierVo findById(String id);
    IPage<CarrierVo> findAll(Page<CarrierVo> page, @Param("params") CarrierSearchParam params);

    /**
     * 司机查看自己所属车队
     *
     * @param userId userId
     * @return List<Carrier>
     */
    List<Carrier> listCarrierDriverBelonged(String userId);

    IPage<Carrier> searchCarrierPage(Page<Carrier> reqPage, @Param("keyword") String keyword,
        @Param("defaultOrgId") String defaultOrgId);
}
